﻿using Wolfpack.Core.Configuration;
using Wolfpack.Core.Interfaces.Entities;
using Wolfpack.Core;

namespace Wolfpack.Contrib.Publishers.MongoDb
{
    public class MongoDbPublisherConfigurationDiscovery : PluginDiscoveryBase<MongoDbConfiguration, MongoDbPublisher>
    {
        protected override MongoDbConfiguration GetConfiguration()
        {
            return new MongoDbConfiguration
                       {
                           AutoIndexId = true,
                           Capped = false,
                           CollectionName = "NotificationEvents",
                           DatabaseName = "Wolfpack",
                           Enabled = true,
                           FriendlyId = "CHANGEME!",
                           Port = 27017,
                           ServerName = "localhost"
                       };
        }

        protected override void Configure(ConfigurationEntry entry)
        {
            entry.Name = "MongoDbPublisher";
            entry.Description = "This publisher will save notifications to a MongoDb database.";
            entry.Tags.AddIfMissing(SpecialTags.PUBLISHER, "MongoDb");
        }
    }
}